{% if attribute(categoryList, 0) %}
<aside id="categories" class="widget widget_categories">
    <h2 class="widget-title">分类目录</h2>
    <ul>
        {% for category in categoryList %}
        <li class="cat-item"><a href="{{ category.url }}" >{{ category.name }}</a></li>
        {% endfor %}
    </ul>
</aside>
{% endif %}